home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / jam / jamdisk7 / inc9110b.lzh / include / math.h < prev    next >
C/C++ Source or Header  |  1991-10-12  |  3KB  |  92 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  * PDC I/O Library (C) 1987 by J.A. Lydiatt.
  5.  *
  6.  * This code is freely redistributable upon the conditions that this
  7.  * notice remains intact and that modified versions of this file not
  8.  * be included as part of the PDC Software Distribution without the
  9.  * express consent of the copyright holders.  No warrantee of any
  10.  * kind is provided with this code.  For further information, contact:
  11.  *
  12.  *  PDC Software Distribution    Internet:                     BIX:
  13.  *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
  14.  *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
  15.  */
  16.  
  17. /* math.h - standard C math functions and constants */
  18.  
  19. /*
  20.  *  3.3.91 sjw;  K&R2, ensure only effective once
  21.  * 21.4.91 sjw;  remove unimplemented functions
  22.  * 18.6.91 sjw;  remove commentary, add inverse hyperbolics. isnan(), isinf(),
  23.  *               max(), min(), poly(), rint(), sign() (which have all been
  24.  *               there all along)
  25.  * 12.10.91 sjw; remove max(), min(), [mod()] which have names which don't
  26.  *               indicate that they are math operations and aren't part
  27.  *               of either K&R's statement or SunOS.
  28.  */
  29.  
  30. #ifndef __MATH_H__
  31. #define __MATH_H__
  32.  
  33. double  modf(double x, double *ip);
  34.  
  35. double  ldexp(double x, int n);
  36. double  frexp(double x, int *exp);
  37.  
  38. double  acos(double x);
  39. double  asin(double x);
  40. double  atan(double x);
  41. double  atan2(double y, double x);
  42.  
  43. double  cos(double x);
  44. double  sin(double x);
  45. double  tan(double x);
  46.  
  47. double  cosh(double x);
  48. double  tanh(double x);
  49. double  sinh(double x);
  50.  
  51. double  sqrt(double x);
  52. double  fabs(double x);
  53. double  floor(double x);
  54. double  ceil(double x);
  55.  
  56. double  exp(double x);
  57. double  log(double x);
  58. double  log10(double x);
  59. double  pow(double x, double y);
  60.  
  61. /* extras */
  62.  
  63. double  acosh(double x);
  64. double  atanh(double x);
  65. double  asinh(double x);
  66. int     isnan(double x);
  67. int     isinf(double x);
  68. double  poly(int order, double coeffs[], double x);
  69. double  rint(double x);
  70. double  sign(double x, double y);
  71.  
  72. #define BITS(type)      (8 * (int)sizeof(type))
  73.  
  74. #define MAXDOUBLE       1.79769313486231470e+308
  75. #define MAXFLOAT        ((float)3.40282346638528860e+38)
  76. #define MINDOUBLE       4.94065645841246544e-324
  77. #define MINFLOAT        ((float)1.40129846432481707e-45)
  78.  
  79. #define DMINEXP (-(DMAXEXP + DSIGNIF - 4))
  80. #define FMINEXP (-(FMAXEXP + FSIGNIF - 4))
  81.  
  82. #define DSIGNIF (BITS(double)-11)
  83. #define FSIGNIF (BITS(float)-8)
  84.  
  85. #define DMAXEXP (1 << 11 - 1)
  86. #define FMAXEXP (1 << 8 - 1)
  87.  
  88. #endif /* __MATH_H__ */
  89.  
  90.  
  91.  
  92.